﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Buy2Site.Classes
{
    public class UserClass
    {
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public DateTime BirthDate { get; set; }
        public string Email { get; set; }
        public string UserName { get; set; }
        public string Password { get; set; }

        public static List<User> GetAllUsers()
        {
            List<User> listOfUsers = null;
            using (Buy2SiteDBEntities dbEnt = new Buy2SiteDBEntities())
            {
                var users = from element in dbEnt.User
                            select element;
                listOfUsers = users.ToList();
            }
            return listOfUsers;
        }
    }
}